/* ==================================================================
 * Copyright (c) 2024/11/15 SCNU LiuJunJie z-ken
 * All rights reserved.
 * fileName:	reToDfaAlgor.h
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the
 * distribution.
 * 3. All advertising materials mentioning features or use of this software
 * must display the following acknowledgement:
 * This product includes software developed by the xxx Group. and
 * its contributors.
 * 4. Neither the name of the Group nor the names of its contributors may
 * be used to endorse or promote products derived from this software
 * without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY Author,GROUP AND CONTRIBUTORS
 * ===================================================================
 * Author: LiuJunJie z-ken.
 */

#include "reToNFA.hpp"
#include "NFAToDFA.hpp"
#include "NfaDfaRecord.hpp"
#include "BuildFromDFA.hpp"

#if !defined(RE_TO_DFA_ALGOR_H)
#define RE_TO_DFA_ALGOR_H

class ReToDfaAlgor
{
public:
    string tokenParserName = "tokenParser";
    string jointFileDefualtPath = "./joint.cpp";
    string exeFileDefualtPath = "split.exe";


    NfaDfaRecord nfaDfaRecord;
    // 默认值-一般作为测试使用
    void makeIt(string pathInput = R"(./testFile.txt)");

    // 实际上，默认的生成代码位置为当前目录的joint.cpp位置
    void makeItWithJointPath(string pathInput = R"(./testFile.txt)", string jointFilePath = "./joint.cpp");

    // 编译一个文件代码
    /**
     * jointExeDirPath输出文件夹位置
     */
    void complieCppFile(const string &jointFilePath, const string &jointExePath = "split.exe");

    /**
     * 使用生成joint文件Exe
     */
    void useJointExe(const string &exeFilePath, const string &readFilePath, const string &outputFileDir);
};

#endif // RE_TO_DFA_ALGOR_H
